# -*- coding: utf-8 -*-
# @Time : 2024/2/18 15:05
# @Author : ZH
# @File : 55.py
# @Software: PyCharm
from typing import List


class Solution:
    def canJump(self, nums: List[int]) -> bool:
        index_ = 0
        for index, value in enumerate(nums[:-1]):
            index_ = max(index_, index+value)
            if index_ <= index:
                return False
        return True


